package net.hn.hnms.biz.safety.fire.company.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.hn.hnms.biz.safety.fire.company.domain.vo.SGJCAlarmVo;
import net.hn.hnms.biz.safety.fire.company.service.CompanyFireService;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.sys.common.satoken.config.AutoSetMineCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 智呈物联 nzw
 * @date 2022/12/29
 */
@RestController
@RequestMapping("company/safety/riskWarning/flood/sgjc")
@Api(value = "火灾监测束管监测", tags = {"束管监测公司端"})
public class FireController {

    private CompanyFireService companyFireService;

    @Autowired
    public void setFompanyFireService(CompanyFireService companyFireService) {
        this.companyFireService = companyFireService;
    }

    /**
     * 内因火灾报警次数变化曲线
     */
    @GetMapping("alarmCurve")
    @ApiOperation("内因火灾报警次数变化曲线")
    @AutoSetMineCode
    public R alarmCurve(){
        return R.ok(companyFireService.alarmCurve());
    }

    /**
     * 内因火灾报警情况
     */
    @GetMapping("alarm")
    @ApiOperation("内因火灾报警情况")
    @AutoSetMineCode
    public R alarm(){
        return R.ok(companyFireService.alarm());
    }

    @GetMapping("/getTodaySGJCAlarmList")
    @ApiOperation("获取今日束管监测报警列表")
    @AutoSetMineCode
    public R<List<SGJCAlarmVo>> getTodaySGJCAlarmList(String companyCode){
        List<SGJCAlarmVo>  list= companyFireService.getTodaySGJCAlarmList(companyCode);
        return R.ok(list);
    }
}
